home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / ply15dat.zip / DNOISE.PI < prev    next >
Text File  |  1992-11-08  |  624b  |  30 lines

  1. // Generic Polyray input File
  2. // Demonstrates a bumpy sphere by applying "dnoise" to the normal
  3. // Polyray input file: Alexander Enzmann
  4.  
  5. // Set up the camera
  6. viewpoint {
  7.    from <0,0,-8>
  8.    at <0,0,0>
  9.    up <0,1,0>
  10.    angle 45
  11.    resolution 256, 256
  12.    }
  13.  
  14. background <0, 0, 0>
  15. light 0.6*white, <-10, 8, -20>
  16. light 0.6*white, < 10, 8, -20>
  17.  
  18. define shiny_red
  19. texture {
  20.    special surface {
  21.       normal N + 2 * (dnoise(3*P) - <0.5, 0.5, 0.5>)
  22.       ambient red, 0.2
  23.       diffuse red, 0.3
  24.       specular white, 0.7
  25.       microfacet Reitz 10
  26.       }
  27.    }
  28.  
  29. object { sphere <0, 0, 0>, 2 shiny_red }
  30.